import React, { Component } from 'react'
import {connect} from "react-redux"
import * as action from "../action"
import {bindActionCreators} from "redux"
class Delivelist extends Component {
  render() {
    console.log(this.props);
    return (
      <div>
          {
              this.props.orderlist &&   this.props.orderlist.length ?  this.props.orderlist.map((item,index)=>{
                  return <div key={index}>
                      <img src={item.img} alt="" />
                      <span>{item.status}</span>
                  </div>
              }) :"暂无发货的订单"
          }
      </div>
    )
  }
}
const mapStateToProps = (state) => {
   
    return {
        ...state.shopReducer
    }
}

const mapDispatchToProps = (dispatch)=>bindActionCreators(action,dispatch)
export default connect(mapStateToProps,mapDispatchToProps)(Delivelist)